/**
 * 熵巡 - 企业级氚云OpenAPI数据管理平台
 * 开发归属 Alyr.net
 * API文档样式 - API接口文档展示样式
 * 尊重劳动成果是一种美德
 */

/* API文档面板样式 */
.api-docs-panel {
    margin: 0 auto;
}

.api-docs-title {
    color: #333;
    margin-bottom: 30px;
    border-bottom: 2px solid #555;
    padding-bottom: 15px;
}

.api-section {
    padding: 20px 0;
}

.api-section-title {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.api-text {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.api-text-sub {
    color: #666;
    margin-bottom: 15px;
}

/* 代码容器样式 */
.code-container {
    position: relative;
    background: #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
}

.code-wrapper {
    display: flex;
    max-height: 600px;
    overflow: auto;
}

.code-lines {
    color: #858585;
    padding: 15px 10px;
    text-align: right;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    width: 50px;
    user-select: none;
    flex-shrink: 0;
}

.code-content {
    flex: 1;
}

.code-pre {
    margin: 0;
    padding: 15px;
    color: #d4d4d4;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #555;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.code-copy-btn:hover {
    background: #666;
}

/* 信息框样式 */
.api-info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.api-info-title {
    margin: 30px 0 15px 0;
    color: #555;
    font-size: 18px;
    font-weight: 600;
}

.api-info-title:first-child {
    margin-top: 0;
}

.api-info-text {
    color: #666;
    margin: 0;
}

.api-url {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    color: #d63384;
}

/* 表格样式 */
.api-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.api-table thead tr {
    background: #e9ecef;
}

.api-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.api-table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.api-table tbody tr:last-child td {
    border-bottom: none;
}

.required {
    color: #dc3545;
}

/* JSON预览样式 */
.api-json-pre {
    background: white;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    color: #333;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}

/* 警告框样式 */
.api-warning-box {
    background: #fff3cd;
    padding: 20px;
    border-radius: 6px;
}

.api-warning-title {
    margin: 0 0 15px 0;
    color: #856404;
}

.api-warning-title-sub {
    margin: 25px 0 15px 0;
    color: #856404;
}

.api-warning-list {
    color: #856404;
    line-height: 2;
    margin: 10px 0;
    padding-left: 20px;
}

/* 示例样式 */
.api-example-title {
    color: #666;
    margin: 20px 0 10px 0;
}

.api-example-title:first-of-type {
    margin-top: 0;
}

.api-example-pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid #dee2e6;
}

/* 错误表格样式 */
.api-error-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.api-error-table thead tr {
    background: #e9ecef;
}

.api-error-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.api-error-table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.api-error-table tbody tr:last-child td {
    border-bottom: none;
}

/* 支持框样式 */
.api-support-box {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 6px;
}

.api-support-title {
    margin: 0 0 15px 0;
    color: #084298;
}

.api-support-text {
    color: #084298;
    line-height: 1.8;
    margin: 0;
}

/* 自定义滚动条样式 */
.api-docs-panel pre::-webkit-scrollbar,
.code-lines::-webkit-scrollbar,
.code-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.api-docs-panel pre::-webkit-scrollbar-track,
.code-lines::-webkit-scrollbar-track,
.code-content::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.api-docs-panel pre::-webkit-scrollbar-thumb,
.code-lines::-webkit-scrollbar-thumb,
.code-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

.api-docs-panel pre::-webkit-scrollbar-thumb:hover,
.code-lines::-webkit-scrollbar-thumb:hover,
.code-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}
